package com.feeyo.groundservice.recordnfc.constant

/**
 *作者：70893 on 2025-10-07
 *描述：资源录入类型
 */


//录入类型
internal enum class RecorderType(val index: Int, val title: String, val type: String) {

    PERSON(0, "人员", "user"),
    CAR(1, "车辆", "car"),
    TASK(2, "任务", "task")//可以和登机口 机位...资源关联
}

//资源类型
enum class ResourceType(val title: String, val simple: String, val hint: String) {

    PERSON("人员列表", "姓名", "请选择人员"),
    CAR("车辆列表", "车牌号", "请选择车牌号"),
    TASK("任务列表", "任务", "请选择任务"),
    GATE("登机口列表", "登机口", "请选择登机口"),
    PARKING("机位列表", "机位", "请选择机位"),
    NFC("NFC列表", "NFC卡号", "请刷NFC卡或输入卡号")
}

//附带类型
enum class AttachResourceType(val type: Int, val title: String,val hint: String,val linkResourceType: ResourceType?) {
    NONE(0, "不限", "请选择",null),
    PARKING(1, "机位", "请选择机位",ResourceType.PARKING),
    GATE(2, "登机口", "请选择登机口",ResourceType.GATE);


    companion object {
        fun getType(type: Int): AttachResourceType {
            entries.forEach {
                if (it.type == type) return it
            }
            return NONE
        }
    }
}


//JsonTag
internal const val RESOURCE_TYPE = "resourceType"
internal const val MULTI_SELECT = "multiSelect"
internal const val SELECT_CALLBACK = "selectCallback"
internal const val DATA = "data"

//外部注入的基础参数
const val USE_NFC = "useNfc"
const val AIRPORT = "airport"
const val IATAS = "iatas"
const val UID = "uid"
const val TOKEN = "token"

//---------------------header-----------------------
const val DS_UID = "DS-UID" //uid
const val DS_ACCESS_TOKEN = "DS-ACCESS-TOKEN"//token
const val DS_REFRESH_TOKEN = "DS-REFRESH-TOKEN"//只在autoLogin接口传
const val DS_APPID = "DS-APPID"   // ios和android都传1
const val DS_DEVICE = "DS-DEVICE"   // ios 1   android 2
const val DS_IATA = "DS-IATA"     //选择的机场三字码
const val DS_VERSION = "DS-VERSION"
const val APPID = "1"
const val DEVICE = "2"
